import 'dart:ui';

import 'package:flutter_riverpod/flutter_riverpod.dart';
import 'theme_interface.dart';
import 'theme_normal.dart';

class ThemeSourceHandle extends ThemeProvider{
  String name;
  late Map<String, ThemeProvider> providers;

  ThemeSourceHandle({required this.name}) {
    providers = {
      'normal': ThemeNormalProvider()
    };
  }

  @override
  // TODO: implement backgroundColor
  Color get backgroundColor => providers[name]!.backgroundColor;

  @override
  // TODO: implement disableColor
  Color get disableColor => providers[name]!.disableColor;

  @override
  // TODO: implement errorColor
  Color get errorColor => providers[name]!.errorColor;

  @override
  // TODO: implement highBackgroundColor
  Color get highBackgroundColor => providers[name]!.highBackgroundColor;

  @override
  // TODO: implement lineColor
  Color get lineColor => providers[name]!.lineColor;

  @override
  // TODO: implement primaryColor
  Color get primaryColor => providers[name]!.primaryColor;

  @override
  // TODO: implement primaryTextColor
  Color get primaryTextColor => providers[name]!.primaryTextColor;

  @override
  // TODO: implement primaryTextGrayColor
  Color get primaryTextGrayColor => providers[name]!.primaryTextGrayColor;

  @override
  // TODO: implement prominentOfPrimaryColor
  Color get prominentHighColor => providers[name]!.prominentHighColor;

  @override
  // TODO: implement shadowColor
  Color get shadowColor => providers[name]!.shadowColor;

  @override
  // TODO: implement widgetBackgroundColor
  Color get widgetBackgroundColor => providers[name]!.widgetBackgroundColor;


}

class ThemeNotifier extends StateNotifier<ThemeSourceHandle> {
  ThemeNotifier(super.state);

  trigger(String name) {
    assert(name == 'normal');
    state.name = name;
  }
}